export default {
  inserted(el, option) {
    el.addEventListener('error', () => {
      el.src = option.value
      console.log(5, el, option)
    })
    // 当图片地址为空时
    el.src = el.src || option.value
  },
  componentUpdated(el, option) {
    el.src = el.src || option.value
  }
}
